﻿namespace A14_EX01_1
{
    using System;
    using System.Collections.Generic;
    using System.Text;

    public static class CalculatedFunctions
    {
        public static float CalcAverage(int i_numbersCounter, int i_sumOfNumbers)
        {
            if (i_numbersCounter != 0)
            {
                return i_sumOfNumbers / i_numbersCounter;
            }
            else
            {
                return 0;
            }
        }

        public static int UpdateMinimum(int i_minimumNumber, int i_currentIntNumber)
        {
            return i_currentIntNumber < i_minimumNumber ? i_currentIntNumber : i_minimumNumber;
        }

        /// <summary>
        /// bla bla
        /// </summary>
        /// <param name="i_maximumNumber"></param>
        /// <param name="i_currentIntNumber"></param>
        /// <returns></returns>
        public static int UpdateMaximum(int i_maximumNumber, int i_currentIntNumber)
        {
            return i_currentIntNumber > i_maximumNumber ? i_currentIntNumber : i_maximumNumber;
        }

        public static bool IsDivided(int i_firstNumber, int i_currentIntNumber)
        {
            return (i_currentIntNumber % i_firstNumber) == 0;
        }
    }
}
